//
//  LoginView.h
//  Trading365
//
//  Created by yifei tong on 12-1-6.
//  Copyright (c) 2012年 dhc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UserTaskDelegate.h"
#import "Session.h"
#import "TKLoadingAnimationView.h"
@interface LoginView : UIViewController <UserTaskDelegate>
{
    CGRect                      m_rect;
    int                         flagLoginType;  //0:login;1:auto;
    NSString *                  ver_server;     //新版本号
    TKLoadingAnimationView *    spinner; 
    BOOL                        loginSuccess;
}
@property (nonatomic, retain) IBOutlet UITextField* m_textFieldCompanyID;
@property (nonatomic, retain) IBOutlet UITextField* username;
@property (nonatomic, retain) IBOutlet UITextField* password;
@property (nonatomic, retain) IBOutlet UITableView* m_tableView;
@property (nonatomic, retain) IBOutlet UIButton*    m_ConfirmBut;
@property (nonatomic, retain) IBOutlet UIButton*    m_CancelBut;

@property (retain, nonatomic) NSString *ver_server;
-(void) OnLogin;
-(IBAction)LoginBtn:(id)sender;
-(IBAction)LogoutBtn:(id)sender;
-(void)saveLoginData:(NSMutableDictionary *)dict;
-(void)reloadLoginData;
//-(NSString *)dataFilePath;
-(void)LoginAutoShow;
-(IBAction)dismissKeyBoard:(id)sender;
-(void) LoginSuccess;
-(void)initTradingApp;
-(void) setFlagLoginType:(int)flag;

-(void) checkUpdateFromServer;
-(void) setSettingsFileData:(NSString *)name Value:(NSString *)value;

@end
